//
//  BaseListViewController.h
//  PandaTakeaway
//
//  Created by smufs on 2017/5/17.
//  Copyright © 2017年 李冰. All rights reserved.
//

#import "BaseViewController.h"

@interface BaseListViewController : BaseViewController<UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) UITableView *tableView;

@property (nonatomic, strong) NSMutableArray *dataSource;

@property (nonatomic, assign) NSInteger pageIndex;
@property (nonatomic, assign) NSInteger pageSize;

// default is UITableViewStyleGrouped
- (void) setupTableView:(CGRect) frame style:(UITableViewStyle) style;

// refresh available with page
- (void) setupPageHeader:(BOOL) header footer:(BOOL) footer;
- (void) headerRefresh;
- (void) footerRefresh;
- (void) opaqueHeaderAndFooter;
// 此函数由子类实现请求 ，必须实现statusBlock回调父类处理分页逻辑
- (void) requestPageData:(void(^)(YCNetworkingStatusCode code, NSArray *dataArray)) statusBlock;

@end
